'use strict';
module.exports = app => {
  // 商品sku表
  const {STRING, INTEGER, FLOAT} = app.Sequelize;
  const Sku = app.model.define('s_sku', {
    id: {type: INTEGER, primaryKey: true, autoIncrement: true},
    goods_id: {
      type: INTEGER,
      comment: '商品主键id',
      allowNull: false,
    },
    goods_keys: {
      type: STRING,
      comment: '商品规格组合id',
    },
    goods_specs: {
      type: STRING,
      comment: '商品规格值组合id',
    },
    goods_stock: {
      type: INTEGER,
      comment: '库存数量',
    },
    goods_price: {
      type: FLOAT,
      comment: '商品价格',
    },
  });

  return Sku;
};
